Optimal. Leaf size=59 \[ \frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2533, 2498,
269, 211} \begin {gather*} \frac {2 \sqrt {e} q \text {ArcTan}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 269
Rule 2498
Rule 2533
Rubi steps
\begin {align*} \int \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right ) \, dx &=\frac {\text {Subst}\left (\int \log \left (c \left (d+\frac {e}{x^2}\right )^q\right ) \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}+\frac {(2 e q) \text {Subst}\left (\int \frac {1}{\left (d+\frac {e}{x^2}\right ) x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}+\frac {(2 e q) \text {Subst}\left (\int \frac {1}{e+d x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 61, normalized size = 1.03 \begin {gather*} -\frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {e}}{\sqrt {d} (f+g x)}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(128\) vs.
\(2(51)=102\).
time = 0.13, size = 129, normalized size = 2.19
method | result | size |
default | \(\ln \left (c \left (\frac {d \,g^{2} x^{2}+2 d f g x +d \,f^{2}+e}{\left (g x +f \right )^{2}}\right )^{q}\right ) x +2 e g q \left (\frac {\frac {f \ln \left (d \,g^{2} x^{2}+2 d f g x +d \,f^{2}+e \right )}{2 g}+\frac {e \arctan \left (\frac {2 d \,g^{2} x +2 d f g}{2 g \sqrt {e d}}\right )}{g \sqrt {e d}}}{e g}-\frac {f \ln \left (g x +f \right )}{g^{2} e}\right )\) | \(129\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (50) = 100\).
time = 0.55, size = 101, normalized size = 1.71 \begin {gather*} g q {\left (\frac {f e^{\left (-1\right )} \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right )}{g^{2}} - \frac {2 \, f e^{\left (-1\right )} \log \left (g x + f\right )}{g^{2}} + \frac {2 \, \arctan \left (\frac {{\left (d g^{2} x + d f g\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d} g}\right ) e^{\left (-\frac {1}{2}\right )}}{\sqrt {d} g^{2}}\right )} e + x \log \left (c {\left (d + \frac {e}{{\left (g x + f\right )}^{2}}\right )}^{q}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 115 vs.
\(2 (50) = 100\).
time = 0.40, size = 288, normalized size = 4.88 \begin {gather*} \left [\frac {g q x \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + q \sqrt {-\frac {e}{d}} \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + 2 \, {\left (d g x + d f\right )} \sqrt {-\frac {e}{d}} - e}{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}\right )}{g}, \frac {g q x \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + \frac {2 \, q \arctan \left (\frac {{\left (d g x + d f\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d}}\right ) e^{\frac {1}{2}}}{\sqrt {d}}}{g}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 137 vs.
\(2 (50) = 100\).
time = 4.18, size = 137, normalized size = 2.32 \begin {gather*} d g^{4} q {\left (\frac {f e^{\left (-1\right )} \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right )}{d g^{5}} - \frac {2 \, f e^{\left (-1\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{5}} + \frac {2 \, \arctan \left (\frac {{\left (d g x + d f\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )}}{d^{\frac {3}{2}} g^{5}}\right )} e + q x \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - q x \log \left (g^{2} x^{2} + 2 \, f g x + f^{2}\right ) + x \log \left (c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.52, size = 163, normalized size = 2.76 \begin {gather*} x\,\ln \left (c\,{\left (d+\frac {e}{{\left (f+g\,x\right )}^2}\right )}^q\right )-\frac {2\,f\,q\,\ln \left (f+g\,x\right )}{g}+\frac {\ln \left (e\,\sqrt {-d\,e}-3\,d\,f^2\,\sqrt {-d\,e}+4\,d\,e\,f+d\,e\,g\,x-3\,d\,f\,g\,x\,\sqrt {-d\,e}\right )\,\left (q\,\sqrt {-d\,e}+d\,f\,q\right )}{d\,g}-\frac {\ln \left (3\,d\,f^2\,\sqrt {-d\,e}-e\,\sqrt {-d\,e}+4\,d\,e\,f+d\,e\,g\,x+3\,d\,f\,g\,x\,\sqrt {-d\,e}\right )\,\left (q\,\sqrt {-d\,e}-d\,f\,q\right )}{d\,g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________